package io.gitee.zhangbinhub.admin.resource.server.health

import io.gitee.zhangbinhub.acp.boot.constant.AcpCoreConstant
import org.noear.solon.health.detector.Detector

class AcpAdminResourceServerDependenciesDetector : Detector {
    override fun getName(): String = "acp-admin-cloud-dependencies-resource-server"

    override fun getInfo(): MutableMap<String, *> {
        val info: MutableMap<String, String?> = kotlin.collections.HashMap()
        info[AcpCoreConstant.INFO_VERSION_KEY] = getVersion()
        return info
    }

    private fun getVersion(): String? {
        return AcpAdminResourceServerDependenciesDetector::class.java.getPackage()?.implementationVersion
    }
}